import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import project from '../views/project.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/Home',
    name: 'Home',
    component: Home
  },
  {
    path:'/msg',
    name:'msg',
    component: () => import('../views/msg.vue'),
    children:[
      {
        path:'com',
        name:'com',
        component: () => import('../views/com.vue')
      },
    ]
  },
  {
    path: '/project',
    name: 'project',
    component: project,
    // redirect:'',
  },
  {
    path: '/about',
    name: 'About',
    component: () => import( '../views/About.vue')
  },
  {
    path: '/map',
    name: 'map',
    component: () => import( '../views/map.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
